package com.cloudsense.ftestm.pojo;

public class UserOperationResult {

    // 响应业务状态
    private Integer status;

    // 响应消息
    private String msg;

    // 响应中的数据
    private Object data;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public UserOperationResult(Integer status, String msg, Object data) {
        this.status = status;
        this.msg = msg;
        this.data = data;
    }

    public static UserOperationResult build(Integer status, String msg, Object data) {
        return new UserOperationResult(status, msg, data);
    }

    public static UserOperationResult handleError(Integer ErrorCode) {
        return new UserOperationResult(ErrorCode, null, null);
    }

    public static UserOperationResult handleError(Integer ErrorCode,String msg) {
        return new UserOperationResult(ErrorCode, msg, null);
    }
}
